﻿namespace NTLib.Core.Configuration
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Runtime.Serialization;
    using System.Text;
    using System.Threading.Tasks;

    /// <summary>
    /// Contains a key value configuration
    /// </summary>
    [DataContract]
    public abstract class ConfigValue
    {
        #region Fields

        /// <summary>
        /// The configuration key
        /// </summary>
        protected string _configKey;

        #endregion

        #region Ctor

        /// <summary>
        /// Initializes a new instance of the <see cref="ConfigValue"/> class.
        /// </summary>
        /// <param name="configKey">The configuration key.</param>
        protected ConfigValue(string configKey)
        {
            this._configKey = configKey;
        }

        #endregion

        #region Properties

        /// <summary>
        /// Gets or sets the configuration key.
        /// </summary>
        [IgnoreDataMember]
        public string ConfigKey { get { return this._configKey; } }

        /// <summary>
        /// Gets or sets a value indicating whether this <see cref="ConfigValue"/> is override.
        /// </summary>
        /// <value>
        ///   <c>true</c> if override; otherwise, <c>false</c>.
        /// </value>
        public bool Override { get; set; }

        #endregion
    }
}
